    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
	  <html xmlns="http://www.w3.org/1999/xhtml">
	    <head>
		    <link rel="stylesheet" type="text/css" href="Styles/spsfbranding.css"/>				
		    		<title>Sample: Add Ribbon Button to Content Type</title>
				<meta name="Description" content="Adds a Button to a Content Type specific ribbon." />
		<style type="text/css">

		.OH_TocResize
		{	
			top: 126px;
		}

		</style>
	</head>	
	<body class="primary-mtps-offline-document">
	<table height="93" width="100%" cellpadding="0" cellspacing="0" border="0"><tr><td style="height:93px; background-image: url('./_img/header_background.jpg'); background-repeat: repeat-x;"><img src="./_img/header_left.jpg" /></td><td valign="right" style="height:93px; background-image: url('./_img/header_background.jpg'); background-repeat: repeat-x; text-align: right;"><img src="./_img/header_right.jpg" /></td></tr></table><div class="OH_outerDiv">
			<div style="WIDTH: 280px" id="LeftNav" class="OH_leftNav">
				<div id="toc">
					<div id="toc_parent">
						<div class="OH_parentTocLinks"><a title="SharePoint Software Factory 2010" href="SPSF_ROOT.html">SharePoint Software Factory 2010</a><br/><a title="Recipe Index" href="SPSF_RECIPES_INDEX.html">Recipe Index</a><br/><a title="SPSF Artefacts" href="SPSF_RECIPES_CATEGORY_ARTEFACTS.html">SPSF Artefacts</a><br/><a title="Custom Actions and Ribbons" href="SPSF_RECIPES_CATEGORY_CUSTOMACTIONS.html">Custom Actions and Ribbons</a><br/></div></div>					
						<div id="toc_children">
							<div class="OH_selfTocLinks"><a title="Custom Action for Content Type" href="SPSF_RECIPE_CUSTOMACTIONCONTENTTYPE.html">Custom Action for Content Type</a><br /><a title="Custom Action for File Extension" href="SPSF_RECIPE_CUSTOMACTIONFILETYPE.html">Custom Action for File Extension</a><br /><a title="Custom Action for ProgID (Document Type)" href="SPSF_RECIPE_CUSTOMACTIONPROGID.html">Custom Action for ProgID (Document Type)</a><br /><a title="Custom Action for List" href="SPSF_RECIPE_CUSTOMACTIONLIST.html">Custom Action for List</a><br /><a title="Custom Action for List Toolbar" href="SPSF_RECIPE_CUSTOMACTIONLISTTOOLBAR.html">Custom Action for List Toolbar</a><br /><a title="Custom Action for Site" href="SPSF_RECIPE_CUSTOMACTIONSITE.html">Custom Action for Site</a><br /><a title="Custom Action for SiteActions menu" href="SPSF_RECIPE_CUSTOMACTIONSITEACTIONSMENU.html">Custom Action for SiteActions menu</a><br /><a title="Custom Action Group" href="SPSF_RECIPE_CUSTOMACTIONGROUP.html">Custom Action Group</a><br /><a title="Hide Custom Action" href="SPSF_RECIPE_HIDECUSTOMACTION.html">Hide Custom Action</a><br /><a title="Ribbon Tab" href="SPSF_RECIPE_RIBBONTAB.html">Ribbon Tab</a><br /><a title="Ribbon Group" href="SPSF_RECIPE_RIBBONGROUP.html">Ribbon Group</a><br /><a title="Ribbon Control" href="SPSF_RECIPE_RIBBONCONTROL.html">Ribbon Control</a><br /><a title="Sample: Add Ribbon Button to List Form" href="SPSF_RECIPE_RIBBONSAMPLELISTVIEWBUTTON.html">Sample: Add Ribbon Button to List Form</a><br /><a title="Sample: Add Ribbon Button to Item Form" href="SPSF_RECIPE_RIBBONSAMPLEITEMFORMBUTTON.html">Sample: Add Ribbon Button to Item Form</a><br /><div title="Sample: Add Ribbon Button to Content Type" class="OH_selectedChild">Sample: Add Ribbon Button to Content Type</div><a title="Sample: Ribbon Tab with 3 buttons" href="SPSF_RECIPE_RIBBONSAMPLETAB.html">Sample: Ribbon Tab with 3 buttons</a><br /><a title="Hide Ribbon Control" href="SPSF_RECIPE_HIDERIBBONCONTROL.html">Hide Ribbon Control</a><br /></div></div><div id="toc_siblings"><div class="OH_siblingTocHeader">Related Links</DIV><div class="OH_siblingTocLinks"><a title="MSDN: How to: Modify the User Interface Using Custom Actions" href="http://msdn.microsoft.com/en-us/library/ms473643.aspx">MSDN: How to: Modify the User Interface Using Custom Actions</a><br /><a title="MSDN: Server Ribbon XML" href="http://msdn.microsoft.com/en-us/library/ff407290.aspx">MSDN: Server Ribbon XML</a><br /><a title="MSDN: Default Server Ribbon Customization Locations" href="http://msdn.microsoft.com/en-us/library/ee537543.aspx">MSDN: Default Server Ribbon Customization Locations</a><br />							<br /></div></div></div></div><div style="LEFT: 279px" id="TocResize" class="OH_TocResize"></div>
				<div class="OH_outerContent">
				  
		<div class="OH_topic">		 
     
		  <div class="OH_title">
			<table>
			  <tbody>
				<tr>
				  <td class="OH_tdTitleColumn">
					<div class="subHeading"><small>SharePoint Software Factory 2010</small></div><br />
					Sample: Add Ribbon Button to Content Type
				  </td>
				  <td class="OH_tdLogoColumn">
				  				  </td>
				</tr>
			  </tbody>
			</table>
		  </div>
		</div>
		<div id="mainSection">
			<div id="mainBody">            
				<div class="introduction"><p>Adds a Button to a Content Type specific ribbon.</p></div>
				




                      <DIV class="OH_CollapsibleAreaRegion">
					        <DIV class="OH_regiontitle">Recipe Description</DIV>
					        <DIV class="OH_RegionToggle"></DIV>
				        </DIV>
				        <DIV class="OH_clear"></DIV>
				        <p>
                        In this sample a custom ribbon button is added to the edit form of the content type Document (0x0101). The following code adds the button to the actions group.<br />&#160;&#160;<br />&#160;&#160;&lt;CustomAction<br />&#160;&#160;&#160;&#160;Id="Ribbon.SP2010.VseWss.RibbonContentType"<br />&#160;&#160;&#160;&#160;Location="CommandUI.Ribbon"<br />&#160;&#160;&#160;&#160;Title="RibbonContentType"<br />&#160;&#160;&#160;&#160;RegistrationType="ContentType"<br />&#160;&#160;&#160;&#160;RegistrationId="0x0101"&gt;<br />&#160;&#160;&#160;&#160;&lt;CommandUIExtension&gt;<br />&#160;&#160;&#160;&#160;&#160;&#160;&lt;CommandUIDefinitions&gt;<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&lt;CommandUIDefinition<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;Location="Ribbon.DocLibListForm.Edit.Actions.Controls._children"&gt;<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&lt;Button<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;Id="Ribbon.SP2010.VseWss.RibbonContentType.Button"<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;Command="SP2010.VseWss.RibbonContentType.ButtonCommand"<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;Sequence="500"<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;Image16by16="/_layouts/images/SP2010_VseWss/RibbonIcon_RibbonContentType_16.gif"<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;Image32by32="/_layouts/images/SP2010_VseWss/RibbonIcon_RibbonContentType_32.gif"<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;LabelText="ContentType Button"<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;ToolTipTitle="ContentType Button"<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;ToolTipDescription="Description of ContentType Button"<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;TemplateAlias="o2" /&gt;<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&lt;/CommandUIDefinition&gt;<br />&#160;&#160;&#160;&#160;&#160;&#160;&lt;/CommandUIDefinitions&gt;<br />&#160;&#160;&#160;&#160;&#160;&#160;&lt;CommandUIHandlers&gt;<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&lt;CommandUIHandler<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;Command="SP2010.VseWss.RibbonContentType.ButtonCommand"<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;CommandAction="javascript:alert('Hello, world');" /&gt;<br />&#160;&#160;&#160;&#160;&#160;&#160;&lt;/CommandUIHandlers&gt;<br />&#160;&#160;&#160;&#160;&lt;/CommandUIExtension&gt;<br />&#160;&#160;&lt;/CustomAction&gt;<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;
				        </p>
				        					<DIV class="OH_CollapsibleAreaRegion">
						<DIV class="OH_regiontitle">Screens</DIV>
						<DIV class="OH_RegionToggle"></DIV>
					</DIV>
					<DIV class="OH_clear"></DIV>
					<p>				
					<span class="spsfscreenshot"><span>
							            <img class="screenshot" src="./Screenshots/RibbonSampleContentTypeButton/100_Ribbon.gif" />
							            <br />
						            </span></span>
					</p>
                    <div class="spsfclear"></div>           
                           <DIV class="OH_CollapsibleAreaRegion">
					<DIV class="OH_regiontitle">Arguments</DIV>
					<DIV class="OH_RegionToggle"></DIV>
				</DIV>
				<DIV class="OH_clear"></DIV>
				<p>
                <table id="argumentTable" width="100%">
                    <tr>
                        <th>Name</th>
                        <th>Description</th>
                    </tr>							<tr>
								<td class="name" colspan="2">General Settings</td>
							</tr>                
														<tr>
								<td>Name</td>
								<td>Required Text. Specifies the name of the button control.</td>
							</tr>                
														<tr>
								<td>Title</td>
								<td>Required Text. The text to label the control.</td>
							</tr>                
														<tr>
								<td>Description</td>
								<td>Required Text. The text that appears as the description of the tooltip.</td>
							</tr>                
														<tr>
								<td>Sequence</td>
								<td>Required Integer. An integer that specifies the order of placement among sibling XML nodes.</td>
							</tr>                
														<tr>
								<td class="name" colspan="2">Optional Permission Settings</td>
							</tr>                
														<tr>
								<td>Rights</td>
								<td>Optional Text. Specifies a set of rights that the user must have in order for the link to be visible. If not specified, then the action always appears in the list of actions. The set of rights are grouped logically according to AND logic.</td>
							</tr>                
														<tr>
								<td>Require Site Administrator</td>
								<td>Optional Boolean. TRUE to specify that the item be displayed only if the user is a site administrator; otherwise, FALSE. Using the RequireSiteAdministrator attribute for the drop-down menu of Windows SharePoint Services commands associated with list items is not supported.</td>
							</tr>                
														<tr>
								<td class="name" colspan="2">Form Settings</td>
							</tr>                
														<tr>
								<td>Custom Action Location</td>
								<td>Required Text. Location element of the custom action.</td>
							</tr>                
														<tr>
								<td class="name" colspan="2">Optional List Settings</td>
							</tr>                
														<tr>
								<td>Content Type</td>
								<td>Select the content type where the action should be added.</td>
							</tr>                
														<tr>
								<td class="name" colspan="2">Location Settings</td>
							</tr>                
														<tr>
								<td>Parent Ribbon Group</td>
								<td>Required Text. Specifies the existing ribbon group into which the new button should be added.</td>
							</tr>                
							                </table>
				</p>
                           
				<DIV class="OH_CollapsibleAreaRegion">
					<DIV class="OH_regiontitle">References</DIV>
					<DIV class="OH_RegionToggle"></DIV>
				</DIV>
				<DIV class="OH_clear"></DIV>
				<p>
				<ul>
				<li>
						<a href="http://msdn.microsoft.com/en-us/library/ms473643.aspx" target="_new">MSDN: How to: Modify the User Interface Using Custom Actions</a>
					</li>
					<li>
						<a href="http://msdn.microsoft.com/en-us/library/ff407290.aspx" target="_new">MSDN: Server Ribbon XML</a>
					</li>
					<li>
						<a href="http://msdn.microsoft.com/en-us/library/ee537543.aspx" target="_new">MSDN: Default Server Ribbon Customization Locations</a>
					</li>
					                
			   </ul></p>
			              <DIV class="OH_CollapsibleAreaRegion">
				<DIV class="OH_regiontitle">Authors</DIV>
				<DIV class="OH_RegionToggle"></DIV>
			</DIV>
			<DIV class="OH_clear"></DIV>  
			<p>
           <ul>
           <li>Torsten Mandelkow</li>           </ul>
           </p>
           
		   <DIV class="OH_CollapsibleAreaRegion">
				<DIV class="OH_regiontitle">Version history</DIV>
				<DIV class="OH_RegionToggle"></DIV>
			</DIV>
			<DIV class="OH_clear"></DIV>  
		   <p>
           <ul>
           <li>1.0 Initial Recipe</li>           </ul>
		   </p>



     
				</div>			
			</div>
							<div class="OH_feedbacklink"><hr size="1" />SharePoint Software Factory 2010, Version 3.2, see <a href="SPSF_OVERVIEW_800_LICENSE.html">License</a> for more information</div>
				<br />
								</div>
				</div>
					</body>
</html>


